package cn.hfjava.kz.entity.excel;

import cn.hfjava.kz.common.annotation.ExcelValid;
import cn.hfjava.kz.common.converter.NongYeConverter;
import cn.hfjava.kz.common.converter.StudentStatusConverter;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.time.LocalDateTime;


@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND)
@HeadFontStyle(fontHeightInPoints = 10)
@ColumnWidth(20)
@Getter
@Setter
@NoArgsConstructor
@ToString
//@ExcelIgnoreUnannotated
public class StudentExcel implements java.io.Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    //@ExcelProperty("编号") // 设置表头名称
    //@ColumnWidth(20)  // 设置列的宽度
    //@ExcelIgnore  忽略某个属性不导出
    //@DateTimeFormat("yyyy-MM-dd HH:mm:ss") //设置日期格式的数据
    //@NumberFormat("#.##") //设置数字格式
    @ExcelIgnore
    private Integer id;

    /**
     * 姓名
     */
    @ExcelProperty(value = "姓名",index = 0)
    @ExcelValid(message = "【姓名】列不能有空数据")
    private String name;

    /**
     * 身份证号
     */
    @ExcelProperty(value = "身份证号码",index = 1)
    private String idNo;

    /**
     * 民族
     */
    @ExcelProperty(value = "民族",index = 2)
    private String nation;

    /**
     * 最高学历
     */
    @ExcelProperty(value = "文化程度",index = 3)
    private String education;

    /**
     * 考生来源
     */
    @ExcelProperty(value = "考生来源",index = 4)
    private String source;

    /**
     * 是否农业户口(0:表示否 1:表示是否）
     */
    @ExcelProperty(value = "是否农业户口",converter = NongYeConverter.class,index = 5)
    private Integer isNY;


    /**
     * 手机号
     */
    @ExcelProperty(value = "联系电话",index = 6)
    private String tel;


    /**
     * 备注
     */
    @ExcelProperty(value = "现持有职业资格证书",index = 7)
    private String remark;

    /**
     * 工作年限
     */
    @ExcelProperty(value = "从事本职业年限",index = 8)
    private Integer workYear;




    /**
     * 通讯地址
     */
    @ExcelProperty(value = "通讯地址",index = 9)
    private String address;

    /**
     * 工作单位
     */
    @ExcelProperty(value = "所在单位",index = 10)
    private String workUnit;

    /**
     * 招生老师
     */
    //@ExcelProperty("招生老师")
    @ExcelIgnore
    private String teacherName;


    /**
     * 创建人
     */
    //@ExcelProperty("创建人")
    @ExcelIgnore
    private String creator;


    @ExcelIgnore
    private String password;


    @ExcelIgnore
    private Integer userId;


    /**
     * 考生状态 (0：待申报 1：已申报)
     */
    //@ExcelProperty(value = "状态",converter = StudentStatusConverter.class)
    @ExcelIgnore
    private Integer status;

    /**
     * 创建日期
     */
    //@ExcelProperty("创建日期")
    //@DateTimeFormat("yyyy-MM-dd")
    @ExcelIgnore
    private LocalDateTime createdDate;


}
